<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="../../../WEB-INF/c.tld" prefix="c"%>

<div class="dessousMenu">

	<div class="formCenter">
		<html:form action="${action }" method="post"
			onsubmit="return validateAdminForm(this);">
			<html:hidden property="idAdmin" value="${admin.id }" />
			<div class="bTitre">
				<div style="color: red; float: right;">${erreur}</div>
				<b>Formulaire administrateur</b>
			</div>

			<div class="divBleu">

				<table class="form">
					<tr>
						<td>Nom :</td>
						<td><input type="text" name="lastname" size="16"
							maxlength="16" value="${admin.lastName }" /></td>
					</tr>
					<tr>
						<td>Prénom :</td>
						<td><input type="text" name="firstname" size="16"
							maxlength="16" value="${admin.firstName }" /></td>
					</tr>

					<c:set var="i" value="${action}" />
					<c:set var="j" value="/update-admin-post.do" />
					<c:if test="${i eq j}">
						<tr>
							<td>Id utilisateur :
							<td><input type="text" name="login" size="16" maxlength="16"
								value="${admin.login }" /></td>
						</tr>
						<tr>
							<td>Mot de passe :</td>
							<td><input type="password" name="password" size="16"
								maxlength="16" value="${admin.password }" /></td>
						</tr>
					</c:if>
					<c:if test="${i ne j}">
						<tr>
							<td>Id utilisateur :
							<td><input type="text" name="login" size="16" maxlength="16"
								value=" " /></td>
						</tr>
						<tr>
							<td>Mot de passe :</td>
							<td><input type="password" name="password" size="16"
								maxlength="16" value="" /></td>
						</tr>
					</c:if>
				</table>
			</div>

			<div class="emplacement_bouton">
				<span class="bouton"><img src="./images/valider.png"><input
					type="submit" value="Valider" class="ok" /></span>
			</div>
			<html:javascript formName="AdminForm" />
		</html:form>
	</div>
</div>